CREATE PROCEDURE [dbo].[users_insert]
    @avatar nvarchar(256),
    @email nvarchar(256),
    @password binary(32),
    @salt binary(8),
    @login nvarchar(256),
    @registrationDate datetime2,
    @status tinyint,
    @lastUpdateDate datetime2
AS
INSERT INTO [dbo].[Users]
(    Avatar,
    Email,
    Password,
    Salt,
    Login,
    RegistrationDate,
    Status,
    LastUpdateDate)
VALUES(
    @avatar,
    @email,
    @password,
    @salt,
    @login,
    @registrationDate,
    @status,
    @lastUpdateDate)
declare @userId int = @@IDENTITY

SELECT
    [UserId],
    [Avatar],
    [Email],
    [Password],
    [Salt],
    [Login],
    [RegistrationDate],
    [Status],
    [LastUpdateDate]
FROM [dbo].[Users] 
WHERE
    Users.[UserId]=@userId
RETURN 0
